import {redirect} from "react-router-dom";
import {getToken} from "../utils/cookie-utils.ts";
import {message} from "antd";


export async function loader() {
    const token = getToken();
    if (token) {
        message.success("登录成功");
    }
    return redirect('/');
}